#ifndef REFERENCE_TIME_FILTER_H_H

#include <streams.h>

class ReferenceTimeFilter : public CBaseFilter
{
public:
	ReferenceTimeFilter(HRESULT *hr = NULL);
	STDMETHODIMP GetTime(REFERENCE_TIME *pTime);
	void pauseTime();
	void startTime();
	void clearFix();

	bool isStop()
	{
		return m_PauseCount > 0;
	}

	int GetPinCount()
	{
		return 0;
	}

	CBasePin* GetPin(int n)
	{
		return NULL;
	}

	void addFixTime(REFERENCE_TIME time)
	{
		m_FixTime += time;
	}
private:
	REFERENCE_TIME m_FixTime;
	REFERENCE_TIME m_PausedTime;

	int m_PauseCount;

	int m_CurrentIndex;

	CCritSec m_Lock;
};
#endif